<!--
  @author liuying
  @date 2018/11/21 15:36
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<html th:replace="~{work/modify/common/layout :: layout('挂起', ~{::title}, ~{::content}, ~{::script})}">
<title>挂起订单</title>

<link rel="stylesheet" href="/static/style/order/order.css" media="all">
</head>
<body>

<div th:fragment="content">
    <style>
        .layui-form-radio {
            width: 390px !important;
        }
    </style>
    <div class="layui-fluid new-order-page">
        <div class="layui-card">
            <form method="post" action="" class="layui-form" lay-filter="zmn-order-add-form">

                <input type="hidden" name="orderId" id="orderId" th:value="${orderInfo.orderId}"/>
                <input type="hidden" name="workId" id="workId" th:value="${orderInfo.workId}"/>

                <div class="layui-split">&nbsp;</div>

                <!-- 挂起原因-->
                <div class="layui-form-item">
                    <label class="layui-form-label" >挂起原因</label>
                    <div class="layui-input-block layui-col-space10">
                        <div class="layui-col-md10" id="faults-wrapper">
                            <input type="radio"
                                   name="dutyFailCode"
                                   lay-skin="primary"
                                   th:each="item : ${suspendList}"
                                   th:title="${item.text}"
                                   th:value="${item.value}"/>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-inline textarea-new-order">
                        <textarea class="layui-textarea"
                                  id="other-remark"
                                  name="reasonDesc"
                                  placeholder="其他原因"></textarea>
                    </div>
                </div>

                <!-- 预约下次联系时间 -->
                <th:block th:with="nowDateOBject = ${#dates.createNow()},
                                   nextHour = ${#dates.hour(nowDateOBject) + 1},
                                   nowDate = ${#dates.format(nowDateOBject, 'yyyy-MM-dd')}">
                    <div class="layui-form-item" id="next-contact-time" >
                            <label class="layui-form-label">下次联系时间</label>
                            <div class="layui-input-inline" id="next-contact-date-wrapper" style="width: 200px;">

                                <input class="layui-input"
                                       id="next-contact-date-input"
                                       type="text"
                                       name="nextContactDate"
                                       lay-verify="nextContTime"
                                       placeholder="请选择日期"
                                       data-th-data-today-available="${nextHour <= 23}"
                                       data-th-data-date="${nowDate}"
                                       th:value="${#dates.format(nextContactTime, 'yyyy-MM-dd')}">
                            </div>
                            <div class="layui-input-inline" id="next-contact-time-wrapper" style="width: 200px;">
                                <input class="layui-input"
                                       id="next-contact-time-input"
                                       type="text"
                                       name="nextContactTime"
                                       placeholder="请选择时间"
                                       data-th-data-hour="${nextHour}"
                                       th:value="${#dates.format(nextContactTime, 'HH:mm:ss')}">
                            </div>
                    </div>
                </th:block>

                <!-- 按钮 -->
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <div>
                            <input id="confirmbtn" type="button" class="layui-btn" lay-submit lay-filter="confirmbtn" value="确认"></input>
                            <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                        </div>
                    </div>
                </div>
                <div style="height: 1px"></div>
            </form>
        </div>
    </div>
</div>

<script th:inline="javascript">
    var layuiModel = {
        oms_work_modify_suspend: "work/modify/zmn.oms.work.modify.suspend"
    };
</script>
</body>
</html>
